Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds wasmtime-c-api dependency to support WASM scripts/functions #1183

Draft
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

rjd15372
Copy link
Contributor

This commit introduces a new dependency on the wasmtime-c-api library.

https://github.com/bytecodealliance/wasmtime

Wasmtime is a standalone runtime for WebAssembly (aka WASM), and we will use it to run WASM binaries inside the Valkey engine.

To enable WASM support in Valkey we need to build Valkey with:

make BUILD_WITH_WASM=yes

If you have your own wasmtime-c-api local build, you can specify its location so that our build system can pick it up:

make BUILD_WITH_WASM=yes WASMTIME_ROOT=path

If you just want to use the upstream wasmtime-c-api binary, you can run:

make download-wasm-binary-deps

before building valkey to download the upstream binary.

This commit introduces a new dependency on the `wasmtime-c-api` library.

https://github.com/bytecodealliance/wasmtime

Wasmtime is a standalone runtime for WebAssembly (aka WASM), and we will
use it to run WASM binaries inside the Valkey engine.

To enable WASM support in Valkey we need to build Valkey with:

```
make BUILD_WITH_WASM=yes
```

If you have your own `wasmtime-c-api` local build, you can specify its
location so that our build system can pick it up:

```
make BUILD_WITH_WASM=yes WASMTIME_ROOT=path
```

If you just want to use the upstream `wasmtime-c-api` binary, you can
run:

```
make download-wasm-binary-deps
```

before building valkey to download the upstream binary.

Signed-off-by: Ricardo Dias <[email protected]>
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.66%. Comparing base (0142198) to head (50ad56b).
Report is 17 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1183      +/-   ##
============================================
- Coverage     70.66%   70.66%   -0.01%     
============================================
  Files           114      114              
  Lines         61716    61799      +83     
============================================
+ Hits          43611    43668      +57     
- Misses        18105    18131      +26     

see 17 files with indirect coverage changes

Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good start. 👍 Let's review more when there's is a working implementation to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants